#ifndef SINGLETONROOT_H
#define SINGLETONROOT_H

#include <QObject>
#include "pagejump.h"
#include "globaldata.h"
#include "dbtool.h"
#include "publictool.h"
#include "csvtools.h"

class SingletonRoot : public QObject
{
    Q_OBJECT
public:
    explicit SingletonRoot(QObject *parent = nullptr);

    static PageJump* pageJump();

    static GlobalData* data();

    static DBTool* db();

    static PublicTool* pTools();

    static CSVTools* pCSVTools();

signals:

};

#ifndef PAGEJUMP
#define PAGEJUMP SingletonRoot::pageJump()
#endif

#ifndef GDATA
#define GDATA SingletonRoot::data()
#endif

#ifndef DB
#define DB SingletonRoot::db()
#endif

#ifndef TOOLS
#define TOOLS SingletonRoot::pTools()
#endif

#ifndef CSV
#define CSV SingletonRoot::pCSVTools()
#endif

#ifndef LOG
#define LOG SingletonRoot::pTools()->showErr
#endif



#endif // SINGLETONROOT_H
